Hi at all! |
Re: Set the value of objects for Enumerate Attribute obj."CBI" += "NA" and so on |
Re: Set the value of objects for Enumerate Attribute SystemAdmin - Tue Jan 22 02:27:18 EST 2013 Module Mod = current Module Object Obj for Obj in Mod do { if(Obj."Object Heading" "" == ""){ Obj."Attribute Name 1" = " " Obj."Attribute Name 2" = " " } } |
Re: Set the value of objects for Enumerate Attribute SystemAdmin - Tue Jan 22 04:49:15 EST 2013 Sorry to bring this back up again, but I wanted to know how to set an object.attribute to that of another object. For example: module2Obj."Part Number" = module1Obj."Part Number" does not work. If I have one object from one module defined, as well as the object from another, I can't set one to be equal to the other. Suggestions??
Thank you all for your time! |
Re: Set the value of objects for Enumerate Attribute ScottKirkwood - Wed Dec 16 10:02:36 EST 2015 Sorry to bring this back up again, but I wanted to know how to set an object.attribute to that of another object. For example: module2Obj."Part Number" = module1Obj."Part Number" does not work. If I have one object from one module defined, as well as the object from another, I can't set one to be equal to the other. Suggestions??
Thank you all for your time! Okay, abort...answer found. My bad. DOORS, for whatever reason, is different from C in that it requires some actual string after all variables and references. Therefore, I found my own answer on a hunch that I need to place an empty string after the object reference. This... module2Obj."Part Number" = module1Obj."Part Number" ...needs to be written like this... module2Obj."Part Number" = module1Obj."Part Number" "" The error that results is VERY confusing and misleading. It says that there is a problem with the "(=)", as if to say that I am trying to set an object.attribute equal to something of a different type. Sorry to bug you all...but, now it's available for Google searching. |
Re: Set the value of objects for Enumerate Attribute ScottKirkwood - Wed Dec 16 10:09:10 EST 2015 Okay, abort...answer found. My bad. DOORS, for whatever reason, is different from C in that it requires some actual string after all variables and references. Therefore, I found my own answer on a hunch that I need to place an empty string after the object reference. This... module2Obj."Part Number" = module1Obj."Part Number" ...needs to be written like this... module2Obj."Part Number" = module1Obj."Part Number" "" The error that results is VERY confusing and misleading. It says that there is a problem with the "(=)", as if to say that I am trying to set an object.attribute equal to something of a different type. Sorry to bug you all...but, now it's available for Google searching. You could also use the set function set (module2Obj."Part Number", module1Obj."Part Number") this looks less confusing :) |